#ifndef _SCREEN_APP_H_
#define _SCREEN_APP_H_

#include<conio.h>
#include <math.h>
#include<iostream>
#include<list>
#include "Gotoxy.h"
#include "MyCircle.h"
#include "screen.h"
#include "Shape.h"
#include "ShapeContainer.h"
using namespace std;

const char ESC=27;

class ScreenApp
{
	static screen m_old_buff,m_new_buff;
	
public:
	void diff();
	void run(ShapeContainer &shape_cont, bool withTransfer);
	void MySwitch(screen &old, screen &my_new);
	void rectCollisionAux(list<Shape*>::iterator itr, ShapeContainer &work_cont);
	void circleCollisionAux(list<Shape*>::iterator itr, ShapeContainer &work_cont);
	bool checkIfClear(list<Shape*>::iterator itr, ShapeContainer &work_cont,int x, int y);
	void updateNewScreen( ShapeContainer &work_cont); 
	void clearNewScreen(){ m_new_buff.initScr();} 
	bool specialCheck(list<Shape*>::iterator itr, ShapeContainer &work_cont, int cx, int cy);
};

#endif